<%-- 
    Document   : check_complaints
    Created on : Jan 26, 2012, 3:10:04 PM
    Author     : haqqiem
--%>

<%@ include file="/WEB-INF/jsp/include/page_header.jspf" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<s:useActionBean beanclass="ipfms.stripes.util.ListUtil" var="list"/>
<link type="text/css" href="${pageContext.request.contextPath}/css/ui-lightness/jquery-ui-1.8.17.custom.css" rel="stylesheet" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" type="text/css" media="screen" />

<script type="text/javascript">
    function validateField(){
        var data = document.getElementById('idRep');
        if(data.value == ''){
            alert("Please insert ID Complaints!");
            $('#idRep').focus();
            return false;
        }
    }

</script>
<form:form beanclass="ipfms.stripes.maintenance.CheckingComplaintsActionBean">
    <s:messages/>
    <s:errors/>
    <%--<table width="600" border="0" cellpadding="0" cellspacing="0" class="normaltext">
        <tr>
            <td><img src="images/1_1_empty.gif" width="50" height="8"></td>
        </tr>
        <tr>
            <td colspan="3"><img src="${pageContext.request.contextPath}/images/1_1_empty.gif" width="50" height="8"></td>
        </tr>
        <tr>
            <td width="226" colspan="3" class="superyellow"><u>CHECKING COMPLAINTS</u></td>
        </tr>
        <tr>
            <td colspan="3"><img src="${pageContext.request.contextPath}/images/1_1_empty.gif" width="50" height="8"></td>
        </tr>
        <tr>
            <td  style="text-align: right"><font color="red">*</font> ID Complaint :</td>
            <td>
                <s:text name="fReport.idReport" style="width:250px" class="normal_text" id="idRep"/><s:submit name="searching" value="Search" class="btn" onclick="return validateField()"/>
            </td>
        </tr>
        <tr>
            <td><img src="images/1_1_empty.gif" width="50" height="8"></td>
        </tr>
    </table>--%>
    <p></p>
    <div class="subtitle">

        <fieldset class="aras1">
            <legend>CHECKING COMPLAINTS</legend>

            <div class="content">
                <p>
                    <label class="label1">ID Complaint :</label>
                    <s:text name="fReport.idReport" style="width:250px" class="normal_text" id="idRep"/><s:submit name="searching" value="Search" class="btn" onclick="return validateField()"/>
                </p>
            </div>
                <br>
            <div class="content" align="center">
                <display:table class="tablecloth" style="width:100%; border:0px;  bordercolor:#BBB;" name="${actionBean.listOfReport}" pagesize="10"
                               cellpadding="0" cellspacing="0" id="line"
                               requestURI="/check_complaint">
                    <display:column title="No" sortable="true" style="vertical-align:baseline"><div align="center">${line_rowNum}</div></display:column>
                    <display:column title="Property">
                        <a href="${pageContext.request.contextPath}/check_complaint?viewDetail&idBuilding=${line.building.idBuilding}&idReport=${line.idReport}&from=comp">
                            ${line.building.buildingName}</a>
                        </display:column>
                        <display:column title="Complaints" property="code.name" style="vertical-align:baseline"/>
                        <display:column title="Reported By" property="infoAudit.dimasukOleh.nama" style="vertical-align:baseline"/>
                        <display:column title="Date"><fmt:formatDate value="${line.infoAudit.tarikhMasuk}" pattern="dd/MM/yyyy hh:mm a"/></display:column>
                        <display:column title="Status">
                            <c:choose>
                                <c:when test="${line.status eq 'A'}">Active</c:when>
                            <c:otherwise>Inactive</c:otherwise></c:choose>
                    </display:column>
                </display:table><div align="left"><font style="font-style: italic;font-size: 10px;">* Click hyperlink to view the details.</font></div>
            </div></fieldset>
    </div>
    <%--<div>
        <display:table class="tablecloth" style="width:100%; border:0px;  bordercolor:#BBB;" name="${actionBean.listOfReport}" pagesize="10"
                       cellpadding="0" cellspacing="0" id="line"
                       requestURI="/check_complaint">
            <display:column title="No" sortable="true" style="vertical-align:baseline"><div align="center">${line_rowNum}</div></display:column>
            <display:column title="Property">
                <a href="${pageContext.request.contextPath}/check_complaint?viewDetail&idBuilding=${line.building.idBuilding}&idReport=${line.idReport}">
                                                    ${line.building.buildingName}</a>
            </display:column>
            <display:column title="Complaints" property="code.name" style="vertical-align:baseline"/>
            <display:column title="Reported By" property="infoAudit.dimasukOleh.nama" style="vertical-align:baseline"/>
            <display:column title="Date"><fmt:formatDate value="${line.infoAudit.tarikhMasuk}" pattern="dd/MM/yyyy hh:mm a"/></display:column>
            <display:column title="Status">
                <c:choose>
                    <c:when test="${line.status eq 'A'}">Active</c:when>
                    <c:otherwise>Inactive</c:otherwise></c:choose>
            </display:column>
        </display:table>
    </div><font style="font-style: italic;font-size: 10px" >* Click hyperlink to view the details.</font>--%>
</form:form>